Scientific Linux 6
Sponsored Link

Configure NIS Client
2011/03/16
  Configure on NIS clients in order to share users' accounts in your local networks.
[root@www ~]#
yum -y install ypbind rpcbind


[root@www ~]#
vi /etc/sysconfig/network


NETWORKING=yes
HOSTNAME=www.srv.world
# add at the last line

NISDOMAIN=srv.world


[root@www ~]#
vi /etc/sysconfig/authconfig


USENIS=
yes
# line 19: change


[root@www ~]#
vi /etc/yp.conf


# add at the last line ( [domain] server [NIS server] )

domain srv.world server master.srv.world


[root@www ~]#
vi /etc/nsswitch.conf


passwd:
files
nis
# line 33: add

shadow:
files
nis
# add

group:
files
nis
# add

hosts:
files dns
nis
# add


# add optionally if you need ( create home directory automatically if it's none )

[root@www ~]#
vi /etc/pam.d/system-auth


# add at the last line

session optional pam_mkhomedir.so skel=/etc/skel umask=077


[root@www ~]#
chkconfig rpcbind on

[root@www ~]#
chkconfig ypbind on

[root@www ~]#
shutdown -r now


www.srv.world login:
debian
# user on NIS

Password:
# password

Creating directory '/home/debian'.
Last login: Wed Mar 16 22:28:32 on ttyS0
[debian@www ~]$
# logined

[debian@www ~]$
master
[debian@www ~]$
ypcat passwd

fermi:x:500:500::/home/fermi:/bin/bash
ubuntu:x:502:502::/home/ubuntu:/bin/bash
cent:x:501:501::/home/cent:/bin/bash
debian:x:503:503::/home/debian:/bin/bash
[debian@www ~]$
ypcat hosts

10.0.0.100 master master.srv.world
10.0.0.100 master master.srv.world
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
[debian@www ~]$
# try to chnage NIS password

Changing NIS account information for debian on master.
Please enter old password:
# current one

Changing NIS password for debian on master.
Please enter new password:
# new one

Please retype new password:

The NIS password has been changed on master.
[debian@www ~]$
# just changed

 
Tweet